<?php
/**
 * 
 * @author nhan
 *
 */
class Model_ProductClass extends Model_AbstractModel{
	private $nameClass;
	private $nameClassFolder;
	private $orderIndex;
	private $idCategory;
	private $note;
	
	// name category
	private $categoryName;
	
	public function __construct($data) {
		parent::__construct($data);
		if (is_array ( $data )) {
			
			if (isset ( $data ['name_class'] )) {
				$this->nameClass = $data ['name_class'];
			}
			
			if (isset ( $data ['name_class_folder'] )) {
				$this->nameClassFolder = $data ['name_class_folder'];
			}
			
			if (isset ( $data ['order_index'] )) {
				$this->orderIndex = $data ['order_index'];
			}
			
			if (isset ( $data ['id_category'] )) {
				$this->idCategory = $data ['id_category'];
			}
			
			if (isset ( $data ['note'] )) {
				$this->note = $data ['note'];
			}
			
			if (isset ( $data ['category_name'] )) {
				$this->categoryName = $data ['category_name'];
			}
			
		}
	}
	
	/**
	 * (non-PHPdoc)
	 * @see Model_AbstractModel::toArray()
	 */
	public function toArray() {
		$arr = parent::toArray();
		$arr['name_class']			= $this->nameClass;
		$arr['name_class_folder']	= $this->nameClassFolder;
		$arr['order_index']			= $this->orderIndex;
		$arr['id_category']			= $this->idCategory;
		$arr['note']				= $this->note;
	
		return $arr;
	}
	
	public function getOrderIndex() {
		return $this->orderIndex;
	}
	
	public function getNameClass() {
		return $this->nameClass;
	}
	
	public function getNameClassFolder() {
		//return $this->nameClassFolder;
		return $this->id;
	}
	
	public function getIdCategory() {
		return $this->idCategory;
	}
	
	public function getNote() {
		return $this->note;
	}
	
	public function setNameClass($x) {
		$this->nameClass = $x;
	}	
	
	public function setNameClassFolder($x) {
		$this->nameClassFolder = $x;
	}
	
	public function setOrderIndex($x) {
		$this->orderIndex = $x;
	}
	
	public function setIdCategory($x) {
		$this->idCategory = $x;
	}
	
	public function setNote($x) {
		$this->note = $x;
	}
	
	public function getCategoryName() {
		return $this->categoryName;
	}
	
	public function setCategoryName($categoryName) {
		$this->categoryName = $categoryName;
	}
}